﻿{include file="public/header" /}
<body>
<div class="x-nav">
      <span class="layui-breadcrumb">
        <a href="">首页</a>
        <a href="">用户管理</a>
        <a>
          <cite>订单列表</cite>
        </a>
      </span>
  <a class="layui-btn layui-btn-small" style="line-height:1.6em;margin-top:3px;float:right" href="javascript:location.replace(location.href);" title="刷新">
    <i class="layui-icon" style="line-height:30px">ဂ</i></a>
</div>

<div class="x-body" >

  <div class="container-wrap">
    <div class="box-1">
      <table class="layui-table">
        <thead>
        <tr>
        <th style="text-align: center" width="100">订单号</th>
        <th style="text-align: center" width="40">总价</th>
          <th style="text-align: center" width="20">订单状态</th>
          <th style="text-align: center" width="20">收获地址</th>
          <th style="text-align: center" width="20">商品列表</th>
          <th style="text-align: center" width="20">订单时间</th>
      </tr>
      </thead>
      <tbody>
      {volist name="orders" id="orders"}
      <tr  style="text-align: center">
        <td><a style="cursor: pointer" onclick="x_admin_show('订单详情','{:url(\'admin/order/orderInfo\',[\'id\'=>$orders.id])}/')" title="订单详情" >{$orders.order_id}</a></td>

        <td>{$orders.payment}</td>
        <?php $goods = json_decode($orders['goods_item']) ;?>
        <?php $address = json_decode($orders['address']) ;?>
        <td>
          {switch $orders.status }
          {case 1 }
          <span class="green">待付款</span>
          {/case}
          {case 2 }
          已付款
          {/case}
          {case 3}
          <span class="green">未发货</span>
          {/case}
          {case 4}
          <a class="blue">已发货</a>
          {/case}
          {case 5}
          <a class="blue">交易成功</a>
          {/case}
          {case 6}
          <a class="blue">交易关闭</a>
          {/case}
          {default /}订单异常
          {/switch}
        </td>
        <td><?php echo $address->detailed ;?>,<?php echo $address->name ;?>，<?php echo $address->province ;?>
        </td>
        <td>
          <?php foreach($goods as $v_doods): ?>
          <?php $goodss = $v_doods->goods;?>
          <?php $id = $goodss->id;?>
          <a class="img60" href="{:url('index/Goods/index',array('id'=>$id))}" target="_blank"> <img title="<?php echo $goodss->goods_name?>" class="jsimg"   src="/static/uploads/<?php echo $goodss->og_thumb?>" width="30"></a>
          <?php endforeach;?>
        </td>
        <td>  {$orders.create_time}</td>
      </tr>
      {/volist}
      </tbody>
    </table>
    </div>
</div>
  <div class="page">
  </div>

</body>
</html>